package com.atguigu.classroom.vod.api;

import com.atguigu.classroom.model.vod.Teacher;
import com.atguigu.classroom.vod.service.TeacherService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(tags = "讲师信息远程调用接口")
@RestController
@RequestMapping(value = "/api/vod/teacher/")
public class TeacherApiController {
    @Autowired
    private TeacherService teacherService;
    @ApiOperation("根据id集合查询讲师")
    @PostMapping("inner/getTeacherByIds")
    public List<Teacher> getTeachers(@RequestBody List<Long> ids){
        List<Teacher> teacherList = teacherService.listByIds(ids);
        return teacherList;
    }
}
